<template>
  <div class="box">
    <h2>这是儿子组件</h2>
    <p>接收到了数据==={{ ccc }}</p>
    <Foo></Foo>
  </div>
</template>

<script>
import Foo from "./Foo.vue"
import { inject } from "vue"
export default {
  name: "HelloWorld",
  components: { Foo },
  setup() {
    let ccc = inject("aaa")
    return {
      ccc,
    }
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.box {
  width: 600px;
  height: 200px;
  background-color: orange;
}
</style>
